package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.workbench.domain.dto.req.order.OrderCustomizedReq;
import com.sikaryofficial.workbench.domain.dto.resp.order.OrderCustomizedDTO;
import com.sikaryofficial.workbench.domain.entity.OrderCustomized;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : TODO  请填写你的功能描述
 * @date : 2024-09-25
 */
@Mapper
public interface OrderCustomizedMapping {

	OrderCustomizedMapping INSTANCE = Mappers.getMapper(OrderCustomizedMapping.class);

	/**
	 * 实体映射req
	 *
	 * @param req
	 * @return
	 */
	@Mapping(source = "userId", target = "createdBy")
	OrderCustomized coverToEntity(OrderCustomizedReq req);


	List<OrderCustomized> coverListToEntity(List<OrderCustomizedReq> reqs);

	/**
	 * 实体映射resp
	 *
	 * @param orderCustomized
	 * @return
	 */
	OrderCustomizedDTO coverToResp(OrderCustomized orderCustomized);

	List<OrderCustomizedDTO> coverListToResp(List<OrderCustomized> orderCustomizeds);

}
